<?php /* Smarty version Smarty-3.0.7, created on 2014-08-16 10:02:05
         compiled from "C:\xampp\htdocs\farmonline\code/themes/prestashop/order-address.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2252953eec9ad740ca9-37303722%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '879c8cee74eb4b6a48d13bc97752a88e3321a08c' => 
    array (
      0 => 'C:\\xampp\\htdocs\\farmonline\\code/themes/prestashop/order-address.tpl',
      1 => 1408120198,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2252953eec9ad740ca9-37303722',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_function_counter')) include 'C:\xampp\htdocs\farmonline\code\tools\smarty\plugins\function.counter.php';
if (!is_callable('smarty_modifier_escape')) include 'C:\xampp\htdocs\farmonline\code\tools\smarty\plugins\modifier.escape.php';
?>

<?php if ($_smarty_tpl->getVariable('opc')->value){?>
	<?php $_smarty_tpl->tpl_vars["back_order_page"] = new Smarty_variable("order-opc.php", null, null);?>
<?php }else{ ?>
	<?php $_smarty_tpl->tpl_vars["back_order_page"] = new Smarty_variable("order.php", null, null);?>
<?php }?>
<?php if (!isset($_smarty_tpl->getVariable('formatedAddressFieldsValuesList',null,true,false)->value)){?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[0] = "id_address";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[1] = "id_country";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[2] = "id_state";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[3] = "id_customer";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[4] = "id_manufacturer";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[5] = "id_supplier";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[6] = "date_add";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[7] = "date_upd";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[8] = "active";?>
	<?php if (!isset($_smarty_tpl->tpl_vars['ignoreList']) || !is_array($_smarty_tpl->tpl_vars['ignoreList']->value)) $_smarty_tpl->createLocalArrayVariable('ignoreList', null, null);
$_smarty_tpl->tpl_vars['ignoreList']->value[9] = "deleted";?>	
	
	<?php if (isset($_smarty_tpl->getVariable('addresses',null,true,false)->value)){?>
		<?php  $_smarty_tpl->tpl_vars['address'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('addresses')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['address']->key => $_smarty_tpl->tpl_vars['address']->value){
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['address']->key;
?>
			<?php echo smarty_function_counter(array('start'=>0,'skip'=>1,'assign'=>'address_key_number'),$_smarty_tpl);?>

			<?php $_smarty_tpl->tpl_vars['id_address'] = new Smarty_variable($_smarty_tpl->tpl_vars['address']->value['id_address'], null, null);?>
			<?php  $_smarty_tpl->tpl_vars['address_content'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['address_key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['address']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['address_content']->key => $_smarty_tpl->tpl_vars['address_content']->value){
 $_smarty_tpl->tpl_vars['address_key']->value = $_smarty_tpl->tpl_vars['address_content']->key;
?>
				<?php if (!in_array($_smarty_tpl->tpl_vars['address_key']->value,$_smarty_tpl->getVariable('ignoreList')->value)){?>
					<?php if (!isset($_smarty_tpl->tpl_vars['formatedAddressFieldsValuesList']) || !is_array($_smarty_tpl->tpl_vars['formatedAddressFieldsValuesList']->value)) $_smarty_tpl->createLocalArrayVariable('formatedAddressFieldsValuesList', null, null);
$_smarty_tpl->tpl_vars['formatedAddressFieldsValuesList']->value[$_smarty_tpl->getVariable('id_address')->value]['ordered_fields'][$_smarty_tpl->getVariable('address_key_number')->value] = $_smarty_tpl->tpl_vars['address_key']->value;?>
					<?php if (!isset($_smarty_tpl->tpl_vars['formatedAddressFieldsValuesList']) || !is_array($_smarty_tpl->tpl_vars['formatedAddressFieldsValuesList']->value)) $_smarty_tpl->createLocalArrayVariable('formatedAddressFieldsValuesList', null, null);
$_smarty_tpl->tpl_vars['formatedAddressFieldsValuesList']->value[$_smarty_tpl->getVariable('id_address')->value]['formated_fields_values'][$_smarty_tpl->getVariable('address_key')->value] = $_smarty_tpl->tpl_vars['address_content']->value;?>
					<?php echo smarty_function_counter(array(),$_smarty_tpl);?>

				<?php }?>
			<?php }} ?>
		<?php }} ?>
	<?php }?>
<?php }?>

<script type="text/javascript">
// <![CDATA[
	<?php if (!$_smarty_tpl->getVariable('opc')->value){?>
	var orderProcess = 'order';
	var currencySign = '<?php echo html_entity_decode($_smarty_tpl->getVariable('currencySign')->value,2,"UTF-8");?>
';
	var currencyRate = '<?php echo floatval($_smarty_tpl->getVariable('currencyRate')->value);?>
';
	var currencyFormat = '<?php echo intval($_smarty_tpl->getVariable('currencyFormat')->value);?>
';
	var currencyBlank = '<?php echo intval($_smarty_tpl->getVariable('currencyBlank')->value);?>
';
	var txtProduct = "<?php echo smartyTranslate(array('s'=>'product'),$_smarty_tpl);?>
";
	var txtProducts = "<?php echo smartyTranslate(array('s'=>'products'),$_smarty_tpl);?>
";
	<?php }?>

	var formatedAddressFieldsValuesList = new Array();

	<?php  $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['id_address'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('formatedAddressFieldsValuesList')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value){
 $_smarty_tpl->tpl_vars['id_address']->value = $_smarty_tpl->tpl_vars['type']->key;
?>
		formatedAddressFieldsValuesList[<?php echo $_smarty_tpl->tpl_vars['id_address']->value;?>
] =
		{
			'ordered_fields':[
				<?php  $_smarty_tpl->tpl_vars['field_name'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['num_field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['type']->value['ordered_fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['field_name']->index=-1;
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['field_name']->key => $_smarty_tpl->tpl_vars['field_name']->value){
 $_smarty_tpl->tpl_vars['num_field']->value = $_smarty_tpl->tpl_vars['field_name']->key;
 $_smarty_tpl->tpl_vars['field_name']->index++;
 $_smarty_tpl->tpl_vars['field_name']->first = $_smarty_tpl->tpl_vars['field_name']->index === 0;
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['inv_loop']['first'] = $_smarty_tpl->tpl_vars['field_name']->first;
?>
					<?php if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['inv_loop']['first']){?>,<?php }?>"<?php echo $_smarty_tpl->tpl_vars['field_name']->value;?>
"
				<?php }} ?>
			],
			'formated_fields_values':{
					<?php  $_smarty_tpl->tpl_vars['field_name'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['pattern_name'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['type']->value['formated_fields_values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['field_name']->index=-1;
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['field_name']->key => $_smarty_tpl->tpl_vars['field_name']->value){
 $_smarty_tpl->tpl_vars['pattern_name']->value = $_smarty_tpl->tpl_vars['field_name']->key;
 $_smarty_tpl->tpl_vars['field_name']->index++;
 $_smarty_tpl->tpl_vars['field_name']->first = $_smarty_tpl->tpl_vars['field_name']->index === 0;
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['inv_loop']['first'] = $_smarty_tpl->tpl_vars['field_name']->first;
?>
						<?php if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['inv_loop']['first']){?>,<?php }?>"<?php echo $_smarty_tpl->tpl_vars['pattern_name']->value;?>
":"<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['field_name']->value,'htmlall','UTF-8');?>
"
					<?php }} ?>
				}
		}
	<?php }} ?>

	function getAddressesTitles()
	{
		return {
						'invoice': "<?php echo smartyTranslate(array('s'=>'Your billing address'),$_smarty_tpl);?>
",
						'delivery': "<?php echo smartyTranslate(array('s'=>'Your delivery address'),$_smarty_tpl);?>
"
			};

	}


	function buildAddressBlock(id_address, address_type, dest_comp)
	{
		var adr_titles_vals = getAddressesTitles();
		var li_content = formatedAddressFieldsValuesList[id_address]['formated_fields_values'];
		var ordered_fields_name = ['title'];

		ordered_fields_name = ordered_fields_name.concat(formatedAddressFieldsValuesList[id_address]['ordered_fields']);
		ordered_fields_name = ordered_fields_name.concat(['update']);
		
		dest_comp.html('');

		li_content['title'] = adr_titles_vals[address_type];
		li_content['update'] = '<a href="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink('address.php',true);?>
?id_address='+id_address+'&amp;back=<?php echo $_smarty_tpl->getVariable('back_order_page')->value;?>
?step=1<?php if ($_smarty_tpl->getVariable('back')->value){?>&mod=<?php echo $_smarty_tpl->getVariable('back')->value;?>
<?php }?>" title="<?php echo smartyTranslate(array('s'=>'Update'),$_smarty_tpl);?>
"><?php echo smartyTranslate(array('s'=>'Update'),$_smarty_tpl);?>
</a>';

		appendAddressList(dest_comp, li_content, ordered_fields_name);
	}

	function appendAddressList(dest_comp, values, fields_name)
	{
		for (var item in fields_name)
		{
			var name = fields_name[item];
			var value = getFieldValue(name, values);
			if (value != "")
			{
				var new_li = document.createElement('li');
				new_li.className = 'address_'+ name;
				new_li.innerHTML = getFieldValue(name, values);
				dest_comp.append(new_li);
			}
		}
	}

	function getFieldValue(field_name, values)
	{
		var reg=new RegExp("[ ]+", "g");

		var items = field_name.split(reg);
		var vals = new Array();

		for (var field_item in items)
			vals.push(values[items[field_item]]);
		return vals.join(" ");
	}

//]]>
</script>

<?php if (!$_smarty_tpl->getVariable('opc')->value){?>
	<?php ob_start(); ?><?php echo smartyTranslate(array('s'=>'Addresses'),$_smarty_tpl);?>
<?php  Smarty::$_smarty_vars['capture']['path']=ob_get_clean();?>
	<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_dir')->value)."./breadcrumb.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<?php }?>

<?php if (!$_smarty_tpl->getVariable('opc')->value){?><h1><?php echo smartyTranslate(array('s'=>'Addresses'),$_smarty_tpl);?>
</h1><?php }else{ ?><h2>1. <?php echo smartyTranslate(array('s'=>'Addresses'),$_smarty_tpl);?>
</h2><?php }?>

<?php if (!$_smarty_tpl->getVariable('opc')->value){?>
	<?php $_smarty_tpl->tpl_vars['current_step'] = new Smarty_variable('address', null, null);?>
	<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_dir')->value)."./order-steps.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
	<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_dir')->value)."./errors.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<form action="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink($_smarty_tpl->getVariable('back_order_page')->value,true);?>
" method="post">

<?php }else{ ?>
<div id="opc_account" class="opc-main-block">
	<div id="opc_account-overlay" class="opc-overlay" style="display:none;"></div>
<?php }?>
	<div class="giao-hang-1">
		<div class="block-1">
		    <p><input class="checkbox" type="radio" value="1" name="thanhtoan" /><label>Nhận hàng tại quầy</label></p>
			<h2>Lựa chọn cửa hàng gần nhất của bạn</h2>
				<?php  $_smarty_tpl->tpl_vars['stores'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('store')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['stores']->key => $_smarty_tpl->tpl_vars['stores']->value){
?>
					<div class="store">
						<h3><?php echo $_smarty_tpl->tpl_vars['stores']->value['name'];?>
</h3>
						<p class="address-1">
							<?php echo $_smarty_tpl->tpl_vars['stores']->value['address1'];?>

						</p>
						<p class="phone"><?php echo $_smarty_tpl->tpl_vars['stores']->value['phone'];?>
</p>
						<p class="checkbox-store">
							<input class="" type="radio" name="choosestore" value="<?php echo $_smarty_tpl->tpl_vars['stores']->value['id_store'];?>
" />
						</p>
					</div>
				<?php }} ?>
				
		</div>
	
		<div class="block-2">
		        <p><input class="checkbox" type="radio" value="2" name="thanhtoan" /><label>Nhận hàng tại nhà</label></p>
					<form action="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink('authentication.php',true);?>
" method="post" id="login_form" class="std">
						<fieldset>
							<h3><?php echo smartyTranslate(array('s'=>'Already registered ?'),$_smarty_tpl);?>
</h3>
							<p class="text">
								<label for="email"><?php echo smartyTranslate(array('s'=>'E-mail address'),$_smarty_tpl);?>
</label>
								<span><input type="text" id="email" name="email" value="<?php if (isset($_POST['email'])){?><?php echo stripslashes(smarty_modifier_escape($_POST['email'],'htmlall','UTF-8'));?>
<?php }?>" class="account_input" /></span>
							</p>
							<p class="text">
								<label for="passwd"><?php echo smartyTranslate(array('s'=>'Password'),$_smarty_tpl);?>
</label>
								<span><input type="password" id="passwd" name="passwd" value="<?php if (isset($_POST['passwd'])){?><?php echo stripslashes(smarty_modifier_escape($_POST['passwd'],'htmlall','UTF-8'));?>
<?php }?>" class="account_input" /></span>
							</p>
							<p class="submit">
								<?php if (isset($_smarty_tpl->getVariable('back',null,true,false)->value)){?><input type="hidden" class="hidden" name="back" value="<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('back')->value,'htmlall','UTF-8');?>
" /><?php }?>
								<input type="submit" id="SubmitLogin" name="SubmitLogin" class="button" value="<?php echo smartyTranslate(array('s'=>'Log in'),$_smarty_tpl);?>
" />
							</p>
						</fieldset>
					</form>
		<form action="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink('authentication.php',true);?>
?back=<?php echo $_smarty_tpl->getVariable('back')->value;?>
" method="post" id="new_account_form" class="std">
			<fieldset>
				<h3><?php echo smartyTranslate(array('s'=>'Instant Checkout'),$_smarty_tpl);?>
</h3>
				<div id="opc_account_form" style="display: block; ">
					<!-- Account -->
					<p class="required text">
						<label for="guest_email"><?php echo smartyTranslate(array('s'=>'E-mail address'),$_smarty_tpl);?>
</label>
						<input type="text" class="text" id="guest_email" name="guest_email" value="<?php if (isset($_POST['guest_email'])){?><?php echo $_POST['guest_email'];?>
<?php }?>">
						<sup>*</sup>
					</p>
					<p class="radio required">
						<span><?php echo smartyTranslate(array('s'=>'Title'),$_smarty_tpl);?>
</span>
						<input type="radio" name="id_gender" id="id_gender1" value="1" <?php if (isset($_POST['id_gender'])&&$_POST['id_gender']=='1'){?>checked="checked"<?php }?>>
						<label for="id_gender1" class="top"><?php echo smartyTranslate(array('s'=>'Mr.'),$_smarty_tpl);?>
</label>
						<input type="radio" name="id_gender" id="id_gender2" value="2" <?php if (isset($_POST['id_gender'])&&$_POST['id_gender']=='2'){?>checked="checked"<?php }?>>
						<label for="id_gender2" class="top"><?php echo smartyTranslate(array('s'=>'Ms.'),$_smarty_tpl);?>
</label>
					</p>
										<p class="required text">
						<label for="firstname"><?php echo smartyTranslate(array('s'=>'First name'),$_smarty_tpl);?>
</label>
						<input type="text" class="text" id="firstname" name="firstname" onblur="$('#customer_firstname').val($(this).val());" value="<?php if (isset($_POST['firstname'])){?><?php echo $_POST['firstname'];?>
<?php }?>">
						<input type="hidden" class="text" id="customer_firstname" name="customer_firstname" value="<?php if (isset($_POST['firstname'])){?><?php echo $_POST['firstname'];?>
<?php }?>">
						<sup>*</sup>
					</p>
					<p class="required text">
						<label for="lastname"><?php echo smartyTranslate(array('s'=>'Last name'),$_smarty_tpl);?>
</label>
						<input type="text" class="text" id="lastname" name="lastname" onblur="$('#customer_lastname').val($(this).val());" value="<?php if (isset($_POST['lastname'])){?><?php echo $_POST['lastname'];?>
<?php }?>">
						<input type="hidden" class="text" id="customer_lastname" name="customer_lastname" value="<?php if (isset($_POST['lastname'])){?><?php echo $_POST['lastname'];?>
<?php }?>">
						<sup>*</sup>
					</p>
					<p class="select">
						<span><?php echo smartyTranslate(array('s'=>'Date of Birth'),$_smarty_tpl);?>
</span>
						<select id="days" name="days">
							<option value="">-</option>
							<?php  $_smarty_tpl->tpl_vars['day'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('days')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['day']->key => $_smarty_tpl->tpl_vars['day']->value){
?>
								<option value="<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['day']->value,'htmlall','UTF-8');?>
" <?php if (($_smarty_tpl->getVariable('sl_day')->value==$_smarty_tpl->tpl_vars['day']->value)){?> selected="selected"<?php }?>><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['day']->value,'htmlall','UTF-8');?>
&nbsp;&nbsp;</option>
							<?php }} ?>
						</select>
						<select id="months" name="months">
							<option value="">-</option>
							<?php  $_smarty_tpl->tpl_vars['month'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('months')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['month']->key => $_smarty_tpl->tpl_vars['month']->value){
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['month']->key;
?>
								<option value="<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['k']->value,'htmlall','UTF-8');?>
" <?php if (($_smarty_tpl->getVariable('sl_month')->value==$_smarty_tpl->tpl_vars['k']->value)){?> selected="selected"<?php }?>><?php echo smartyTranslate(array('s'=>($_smarty_tpl->tpl_vars['month']->value)),$_smarty_tpl);?>
&nbsp;</option>
							<?php }} ?>
						</select>
						<select id="years" name="years">
							<option value="">-</option>
							<?php  $_smarty_tpl->tpl_vars['year'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('years')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['year']->key => $_smarty_tpl->tpl_vars['year']->value){
?>
								<option value="<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['year']->value,'htmlall','UTF-8');?>
" <?php if (($_smarty_tpl->getVariable('sl_year')->value==$_smarty_tpl->tpl_vars['year']->value)){?> selected="selected"<?php }?>><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['year']->value,'htmlall','UTF-8');?>
&nbsp;&nbsp;</option>
							<?php }} ?>
						</select>
					</p>
					<?php if (isset($_smarty_tpl->getVariable('newsletter',null,true,false)->value)&&$_smarty_tpl->getVariable('newsletter')->value){?>
						<p class="checkbox">
							<input type="checkbox" name="newsletter" id="newsletter" value="1" <?php if (isset($_POST['newsletter'])&&$_POST['newsletter']=='1'){?>checked="checked"<?php }?>>
							<label for="newsletter"><?php echo smartyTranslate(array('s'=>'Sign up for our newsletter'),$_smarty_tpl);?>
</label>
						</p>
						<p class="checkbox">
							<input type="checkbox" name="optin" id="optin" value="1" <?php if (isset($_POST['optin'])&&$_POST['optin']=='1'){?>checked="checked"<?php }?>>
							<label for="optin"><?php echo smartyTranslate(array('s'=>'Receive special offers from our partners'),$_smarty_tpl);?>
</label>
						</p>
					<?php }?>
					<h3><?php echo smartyTranslate(array('s'=>'Delivery address'),$_smarty_tpl);?>
</h3>
				
						<p class="text">
							<label for="company"><?php echo smartyTranslate(array('s'=>'Company'),$_smarty_tpl);?>
</label>
							<input type="text" class="text" id="company" name="company" value="<?php if (isset($_POST['company'])){?><?php echo $_POST['company'];?>
<?php }?>" />
						</p>
					
						<div id="vat_number" style="display:none;">
							<p class="text">
								<label for="vat_number"><?php echo smartyTranslate(array('s'=>'VAT number'),$_smarty_tpl);?>
</label>
								<input type="text" class="text" name="vat_number" value="<?php if (isset($_POST['vat_number'])){?><?php echo $_POST['vat_number'];?>
<?php }?>" />
							</p>
						</div>
					
						<p class="required text">
							<label for="address1"><?php echo smartyTranslate(array('s'=>'Address'),$_smarty_tpl);?>
</label>
							<input type="text" class="text" name="address1" id="address1" value="<?php if (isset($_POST['address1'])){?><?php echo $_POST['address1'];?>
<?php }?>">
							<sup>*</sup>
						</p>
					
						<p class="required postcode text">
							<label for="postcode"><?php echo smartyTranslate(array('s'=>'Zip / Postal Code'),$_smarty_tpl);?>
</label>
							<input type="text" class="text" name="postcode" id="postcode" value="<?php if (isset($_POST['postcode'])){?><?php echo $_POST['postcode'];?>
<?php }?>" onblur="$('#postcode').val($('#postcode').val().toUpperCase());">
							<sup>*</sup>
						</p>
					
						<p class="required text">
							<label for="city"><?php echo smartyTranslate(array('s'=>'City'),$_smarty_tpl);?>
</label>
							<input type="text" class="text" name="city" id="city" value="<?php if (isset($_POST['city'])){?><?php echo $_POST['city'];?>
<?php }?>">
							<sup>*</sup>
						</p>
						<p class="text">
							<label for="phone"><?php echo smartyTranslate(array('s'=>'Phone'),$_smarty_tpl);?>
</label>
							<input type="text" class="text" name="phone" id="phone" value="<?php if (isset($_POST['phone'])){?><?php echo $_POST['phone'];?>
<?php }?>"> <sup style="color:red;">*</sup>
						</p>
					<input type="hidden" name="alias" id="alias" value="<?php echo smartyTranslate(array('s'=>'My address'),$_smarty_tpl);?>
">
					<input type="hidden" name="is_new_customer" id="is_new_customer" value="0">
					<!-- END Account -->
				</div>
			</fieldset>
			<!--
			<fieldset class="account_creation dni">
				<h3><?php echo smartyTranslate(array('s'=>'Tax identification'),$_smarty_tpl);?>
</h3>

				<p class="required text">
					<label for="dni"><?php echo smartyTranslate(array('s'=>'Identification number'),$_smarty_tpl);?>
</label>
					<input type="text" class="text" name="dni" id="dni" value="<?php if (isset($_POST['dni'])){?><?php echo $_POST['dni'];?>
<?php }?>" />
					<span class="form_info"><?php echo smartyTranslate(array('s'=>'DNI / NIF / NIE'),$_smarty_tpl);?>
</span>
					<sup>*</sup>
				</p>
			</fieldset>
			-->
		</form>

		</div>
	</div>

<?php if (!$_smarty_tpl->getVariable('opc')->value){?>
	<p class="cart_navigation submit">
		<input type="hidden" class="hidden" name="step" value="2" />
		<input type="hidden" name="back" value="<?php echo $_smarty_tpl->getVariable('back')->value;?>
" />
		<a href="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink($_smarty_tpl->getVariable('back_order_page')->value,true);?>
?step=0<?php if ($_smarty_tpl->getVariable('back')->value){?>&back=<?php echo $_smarty_tpl->getVariable('back')->value;?>
<?php }?>" title="<?php echo smartyTranslate(array('s'=>'Previous'),$_smarty_tpl);?>
" class="button">&laquo; <?php echo smartyTranslate(array('s'=>'Previous'),$_smarty_tpl);?>
</a>
		<input type="submit" name="processAddress" value="<?php echo smartyTranslate(array('s'=>'Next'),$_smarty_tpl);?>
 &raquo;" class="exclusive" />
	</p>
</form>
<?php }else{ ?>
</div>
<?php }?>